package com.example.yaja.yaja.service;

import com.example.yaja.yaja.dao.IdeaMapper;
import com.example.yaja.yaja.entity.Idea;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Zero on 2017/12/4.
 */
@Service("ideaService")
public class IdeaServiceImpl implements IdeaService {

    @Autowired
    IdeaMapper ideaMapper;

    @Override
    public int addIdea(Idea idea) {
        return ideaMapper.insertSelective(idea);
    }

    @Override
    public List<Idea> findAllIdea() {
        return ideaMapper.selectAllIdea();
    }
}
